[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  STRING VARIABLE

  A string variable is defined in the form

       str <varname>[<max>];

  where <varname> is the name to be given to the variable. <max> is
  the maximum number of characters that the string can hold, and must
  be in the range of 0 to 32767. An alternate definition is

       str <varname>[<max>], <varname2>[<max>], ...,
       <varnameN>[<max>];

  which allows you to define more than one string variable in a state-
  ment. An original value can be assigned to the string variable by
  using the form

       str <varname>[<max>] = <str_const>;

  where <str_const> is a string constant. Similarly, an original value
  can be assigned in the multiple definition above by placing the as-
  signment before the comma. Some examples are:

       str password[80];
       str password[40] = "mypass", name[30];

  The string length field may be left empty if an original value is
  specified, in which case the length of the string variable is as-
  sumed to be that of the assigned text, e.g.

       str name[] = "John";

  If a variable is outside of a function, it is global. If it is de-
  fined inside a function, it is local to that function and will only
  be recognized there. If a variable defined inside a function uses
  the same name as a global variable, any reference to that name while
  in the function will access the local variable. After the function
  has completed, the local variable is removed and a reference to that
  name will access the global variable.

See Also: string constant integer variable case
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson